import instance from "@/utils/request"

//获取商品列表
export function getProList(){
    return instance.get('/pro/list')
}
//获取商品分类
export function getCategoryList(){
    return instance.get('/pro/getCategory')
}
//获取推荐的列表
export function getRecommendList(){
    return instance.post('/pro/showdata',{type:'isrecommend',flag:1})
}
//获取秒杀的列表
export function getSeckillList(){
    return instance.post('/pro/showdata',{type:'isrecommend',flag:1})
}
//筛选商品
export function getSearchList(params:{category:string,search:string}){
    return instance.post('/pro/searchPro',params)
}
//修改商品是否推荐
export function updateRecommend(params:{proid:string,type:'isrecommend',flag:boolean}){
    return instance.post('/pro/updateFlag',params)
}
//修改商品是否秒杀
export function updateSeckill(params:{proid:string,type:'isseckill',flag:boolean}){
    return instance.post('/pro/updateFlag',params)
}